export function useReusableTemplate() {
  let render: any = null
  // 定义模板组件
  const DefineTemplate = {
    setup(_: any, { slots }: any) {
      return () => {
        render = slots.default
      }
    },
  }

  // 渲染模板组件
  const renderTemplate = (props: any) => render?.(props) || ''

  return [DefineTemplate, renderTemplate]
}
